package com.vilen.cms.dao;

import com.vilen.basic.dao.IBaseDao;
import com.vilen.basic.model.Pager;
import com.vilen.cms.model.Channel;
import com.vilen.cms.model.ChannelTree;
import com.vilen.cms.model.Group;
import com.vilen.cms.model.GroupChannel;

import java.util.List;

/**
 * Created by vilen on 2015/8/24.
 */
public interface IGroupDao  extends IBaseDao<Group>{
    public List<Group> listGroup();

    public Pager<Group> findGroup();

    public void deleteGroupUsers(int gid);

    public void addGroupChannel(Group group, Channel channel);

    public GroupChannel loadGroupChannel(int gid, int cid);

    public void clearGroupChannel(int gid);

    public void deleteGroupChannel(int gid, int cid);

    /**
     * 获取某个组的所有管理栏目 id
     */
    public List<Integer> listGroupChannelIds(int gid);

    /**
     * 获取某个组的栏目树
     */
    public List<ChannelTree> generateGroupChannelTree(int gid);

    public List<ChannelTree> generateUserChannelTree(int uid);
}
